package com.saic.localfileloader.table;

/**
 * @DESC:SAP实际数:ACT
 * @author admin
 *
 */
public class SaicSapACT extends TableLoader {

	// 分隔符"|"
	public SaicSapACT(String localpath, String tablename, String token) {
		super(localpath, tablename, token);
		this.charsetName = "GBK";
	}

	@Override
	public String getInsertSQL(String line) {
		String[] tmp = line.split(token);
		if (tmp.length < 3)
			return null;
		return "select \'" + tmp[0] + "\',\'" + tmp[1] + "\',\'" + tmp[2]
				+ "\',\'" + tmp[3] + "\',\'" + tmp[4] + "\',\'" + tmp[5]
				+ "\',\'" + tmp[6] + "\',\'" + tmp[7] + "\',\'" + tmp[8]
				+ "\',\'" + validate(tmp[9]) + "\' from dual";
	}

	@Override
	public String getHeader() {
		// TODO Auto-generated method stub
		return "SOURCE_SYSTEM,TARGET_SYSTEM,TARGET_APPLICATION,DAT_TIMESTAMP,ENTITY,ACCOUNT,YEARS,PERIOD,CUSTOM1,AMOUNT";
	}

	@Override
	public String getDeleteSQL() {
		// TODO Auto-generated method stub
		return null;
	}

}
